using System;
using System.Collections.Generic;
using System.Configuration;
using System.Text;

namespace Sedna.Core.Controller
{
    public class WebConfigBasedGridPaging : IGridPageSizeResolver
    {
        private String key;

        public string Key
        {
            get { return key; }
            set { key = value; }
        }

        public int PageSize
        {
            get
            {
                if (String.IsNullOrEmpty(key))
                    return 0;

                return int.Parse(ConfigurationManager.AppSettings[key]);
            }
        }
    }
}
